<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="../common_taglibs.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8" />
	<title>合作案例管理</title>
	<script type="text/javascript" src="plugin/wangEditor/release/wangEditor.min.js"></script>
	<script type="text/javascript" src="js/website/case_management.js?v=<%=System.currentTimeMillis()%>"></script>
</head>
<body>
<div class="page-content">
	<div class="row">
		<div class="col-xs-12">
			<div class="step-main">
				<ul class="search-top layui-form">
					<li class="left-td">
						<span class="search-tit">案例标题：</span>
						<div class="search-main">
							<input id="title" type="text" placeholder="合作案例标题" autocomplete="off" />
						</div>
					</li>
					<li class="left-td">
						<span class="search-tit">发布状态：</span>
						<div class="search-main">
							<select id="isPush" lay-verify="required" lay-search>
								<option value="">全部</option>
								<option value="1">已发布</option>
								<option value="0">未发布</option>
							</select>
						</div>
					</li>
				</ul>
				<div class="clear"></div>
				<div class="search-button">
					<c:if test="${fn:contains($rightList,'home/queryCase')}">
						<button id="queryCaseButton" type="button" class="search-fn-btn">
							<i class="icon-search"></i> 查询
						</button>
					</c:if>
				</div>
			</div>
			<div id="toolbarDiv">
				<c:if test="${fn:contains($rightList,'home/createCase')}">
					<button id="createCaseButton" type="button" class="btn btn-step">
						<i class="icon-credit-card"></i> 创建
					</button>
				</c:if>
				<c:if test="${fn:contains($rightList,'home/modifyCase')}">
					<input type="hidden" id="modify" value="1" />
				</c:if>
				<c:if test="${fn:contains($rightList,'home/delCase')}">
					<input type="hidden" id="delete" value="1" />
				</c:if>
				<c:if test="${fn:contains($rightList,'home/modifyCasePush')}">
					<input type="hidden" id="publish" value="1" />
				</c:if>
			</div>
			<div class="step-main">
				<div class="table-responsive">
					<table id="dataTable" class="table table-striped table-bordered">
						<thead>
						<tr>
							<th class="center">排序码</th>
							<th class="center">标题</th>
							<th class="center">副标题</th>
							<th class="center">是否发布</th>
							<th class="center">创建时间</th>
							<th width="100px" class="center">操作</th>
						</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
				</div>
				<div class="page-new clear">
					<div id="pageDiv" align="right" class="pull-right"></div>
				</div>
			</div>
		</div>
	</div>
</div>

<div id="createCaseDialog" class="modal fade">
	<div class="modal-dialog-max">
		<div class="modal-content">
			<div class="modal-header no-padding">
				<div class="table-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
						<span class="box-close">×</span>
					</button>
					创建合作案例
				</div>
			</div>

			<div class="modal-body-max no-padding">
				<div class="page-content" style="background:#fff">
					<div class="row">
						<div class="col-xs-12">
							<form id="addCaseForm" class="form-horizontal" role="form">
								<div class="space-4"></div>
								<table class="table site-box">
									<tr>
										<td width="100px" align="right"><span class="required_style">*</span>排序：</td>
										<td><input id="cCaseSort" type="text" onkeyup="integerChange(this)" class="uniform input-large" placeholder="排序为阿拉伯数字" autocomplete="off" /></td>
									</tr>
									<tr>
										<td align="right"><span class="required_style">*</span>标题：</td>
										<td><input id="cCaseTitle" type="text" class="uniform input-large"  placeholder="合作案例标题" autocomplete="off" /></td>
									</tr>
									<tr>
										<td align="right"><span class="required_style">*</span>副标题：</td>
										<td><input id="cSubtitle" type="text" class="uniform input-large"  placeholder="合作案例副标题" autocomplete="off" /></td>
									</tr>
									<tr>
										<td align="right"><span class="required_style">*</span>列表图片：</td>
										<td><input type="hidden" id="cCaseImgUrl" />
											<div id="cCaseImgFileDiv"></div>
                                            <input type="file" id="cCaseImgFile" onchange="showUploadFile(this.id,'cCaseImgFileDiv','cCaseImgUrl','0',true);" /> 建议上传大小为370*252的图片，展示效果更佳</td>
									</tr>
									<tr>
										<td align="right"><span class="required_style">*</span>正文头图：</td>
										<td><input type="hidden" id="cCaseImgContentUrl" />
											<div id="cCaseImgContentFileDiv"></div>
                                            <input type="file" id="cCaseImgContentFile" onchange="showUploadFile(this.id,'cCaseImgContentFileDiv','cCaseImgContentUrl','0',true);" /> 建议上传大小为734*201的图片，展示效果更佳</td>
									</tr>
									<tr>
										<td align="right">seo-title：</td>
										<td><input id="cKeyTitle" type="text" class="uniform input-large" placeholder="浏览器标题" autocomplete="off" /></td>
									</tr>
									<tr>
										<td align="right">seo-关键词：</td>
										<td><input id="cKeyWords" type="text" class="uniform input-large" placeholder="关键词之间用英文逗号隔开" autocomplete="off" /></td>
									</tr>
									<tr>
										<td align="right">seo-描述：</td>
										<td><textarea id="cCaseDesc" style="width: 600px; height: 50px;" placeholder="合作案例描述"></textarea></td>
									</tr>
									<tr>
										<td align="right"><span class="required_style">*</span>案例详情：</td>
										<td>
											<div id="cCaseDetail"></div>
										</td>
									</tr>
								</table>
								<div class="space-4"></div>
							</form>
						</div>
					</div>
				</div>
			</div>

			<div class="modal-footer no-margin-top">
				<button id="confirmCreateCaseButton" type="button" class="btn btn-primary">确定</button>
				<button class="btn btn-fn btn-delect" data-dismiss="modal">取消</button>
			</div>
		</div>
	</div>
</div>

<div id="modifyCaseDialog" class="modal fade">
	<div class="modal-dialog-max">
		<div class="modal-content">
			<div class="modal-header no-padding">
				<div class="table-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
						<span class="box-close">×</span>
					</button>
					编辑新闻
				</div>
			</div>

			<div class="modal-body-max no-padding">
				<div class="page-content" style="background:#fff;">
					<div class="row">
						<div class="col-xs-12">
							<form id="modifyCaseForm" class="form-horizontal" role="form">
								<input id="mCaseId"type="hidden" />
								<div class="space-4"></div>
								<table class="table site-box">
									<tr>
										<td width="100px" align="right"><span class="required_style">*</span>排序：</td>
										<td><input id="mCaseSort" type="text" onkeyup="integerChange(this)" class="uniform input-large" placeholder="排序为阿拉伯数字" autocomplete="off" /></td>
									</tr>
									<tr>
										<td align="right"><span class="required_style">*</span>标题：</td>
										<td><input id="mCaseTitle" type="text" class="uniform input-large"  placeholder="合作案例标题" autocomplete="off" /></td>
									</tr>
									<tr>
										<td align="right"><span class="required_style">*</span>副标题：</td>
										<td><input id="mSubtitle" type="text" class="uniform input-large"  placeholder="合作案例副标题" autocomplete="off" /></td>
									</tr>
									<tr>
										<td align="right"><span class="required_style">*</span>列表图片：</td>
										<td><input type="hidden" id="mCaseImgUrl" />
											<div id="mCaseImgFileDiv"></div> <input type="file" id="mCaseImgFile"
																					onchange="showUploadFile(this.id,'mCaseImgFileDiv','mCaseImgUrl','0',true);" /> 建议上传大小为370*252的图片，展示效果更佳</td>
									</tr>
									<tr>
										<td align="right"><span class="required_style">*</span>正文头图：</td>
										<td><input type="hidden" id="mCaseImgContentUrl" />
											<div id="mCaseImgContentFileDiv"></div> <input type="file" id="mCaseImgContentFile"
																					onchange="showUploadFile(this.id,'mCaseImgContentFileDiv','mCaseImgContentUrl','0',true);" /> 建议上传大小为734*201的图片，展示效果更佳</td>
									</tr>
                                    <tr>
                                        <td align="right">seo-title：</td>
                                        <td><input id="mKeyTitle" type="text" class="uniform input-large" placeholder="浏览器标题" autocomplete="off" /></td>
                                    </tr>
									<tr>
										<td align="right">seo-关键词：</td>
										<td><input id="mKeyWords" type="text" class="uniform input-large" placeholder="关键词之间用英文逗号隔开" autocomplete="off" /></td>
									</tr>
									<tr>
										<td align="right">seo-描述：</td>
										<td><textarea id="mCaseDesc" style="width: 600px; height: 50px;" placeholder="合作案例描述"></textarea></td>
									</tr>
									<tr>
										<td align="right"><span class="required_style">*</span>案例详情：</td>
										<td>
											<div id="mCaseDetail" style="width:900px;"></div>
										</td>
									</tr>
								</table>
								<div class="space-4"></div>
							</form>
						</div>
					</div>
				</div>
			</div>

			<div class="modal-footer no-margin-top">
				<button id="confirmModifyCaseButton" type="button" class="btn btn-primary">确定</button>
				<button class="btn btn-fn btn-delect" data-dismiss="modal">取消</button>
			</div>
		</div>
	</div>
</div>
</body>
</html>
